package ads_fld

import (
	"server/global"
)

type AdsFld struct {
	global.BaseModel
	ApiId *int `json:"apiId" form:"apiId" gorm:"column:apiId;comment:共享接口id;"`

	SrcSchema string `json:"srcSchema" form:"srcSchema" gorm:"column:srcSchema;comment:源数据库;size:100;"`
	SrcTbId   string `json:"srcTbId" form:"srcTbId" gorm:"column:srcTbId;comment:源数据表id;size:100;"`
	SrcTbName string `json:"srcTbName" form:"srcTbName" gorm:"column:srcTbName;comment:源数据表;size:100;"`

	SrcFldId   string `json:"srcFldId" form:"srcFldId" gorm:"column:srcFldId;comment:源字段id;size:100;"`
	SrcFldName string `json:"srcFldName" form:"srcFldName" gorm:"column:srcFldName;comment:源字段;size:100;"`
	SrcFldType string `json:"srcFldType" form:"srcFldType" gorm:"column:srcFldType;comment:目标字段;size:100;"`
	SrcFldLen  *int   `json:"srcFldLen" form:"srcFldLen" gorm:"column:srcFldLen;comment:源字段长度;"`

	AdsFldName string `json:"adsFldName" form:"adsFldName" gorm:"column:adsFldName;comment:目标字段名称;size:100;"`


	CreatedBy uint `gorm:"column:created_by;comment:创建者"`
	UpdatedBy uint `gorm:"column:updated_by;comment:更新者"`
	DeletedBy uint `gorm:"column:deleted_by;comment:删除者"`
}

func (AdsFld) TableName() string {
	return "ads_fld"
}
